﻿// -- MVC4WPF
// -- Copyright © 2009 Information Control Corporation
// -- Revision History:
// -- Version 0.9.0.0 First codeplex release  - Stephen Giffin

using System;
using System.Windows;
using System.ComponentModel;

namespace MVC4WPF
{
    /// <summary>
    /// Controller for a Windows based WPF view class, this interface implements the basic properties and events needed for controller to controller communications.
    /// </summary>
    public interface IWPFControllerWindow : IWPFController
    {
        /// <summary>
        /// Event that informs subscribers that the view is closing. This can be overridden by cancling the close.
        /// </summary>
        event CancelEventHandler ViewClosing;

        /// <summary>
        /// Subscribers to this event will be alerted when the view for this controller has been closed.
        /// </summary>
        event EventHandler<EventArgs> ViewClosed;

        /// <summary>
        /// The controller will tell the view to show with no modal relationship to the parent window.
        /// </summary>
        void ShowView();

        /// <summary>
        /// The controller will tell the view to display the view modal to the parent window
        /// </summary>
        /// <param name="parentWindow">The window that holds the parent relationship in the modal view.</param>
        void ShowViewModal(Window parentWindow);

        /// <summary>
        /// The controller will tell the view to hide.
        /// </summary>
        void HideView();
    }
}
